<%@ page contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:requestEncoding value="UTF-8"/>    
<c:set var="path" value="/projectv9/" scope="application"/>	
<!-- scope="application" 을 써서 방문자 매번 접속할때마다 변수를 새로 지정하는것을 막아준다 . java의 static과 같은 맥락-->
<c:set var="suffix" value=".jsp" scope="application"/>	
<c:set var="member" value="member/" scope="application"/>	
<c:set var="board" value="board/" scope="application"/>	
<c:set var="action" value="${param.action }"/>	
<c:if test="${empty action}">
	<c:set var="action" value="${path }index${suffix}"/>
</c:if>
<c:if test="${(action eq 'login') or 
			  (action eq 'loginok') or 
			  (action eq 'logout') or 
			  (action eq 'join') or 
			  (action eq 'joinok') or 
			  (action eq 'myinfo')}">
	<c:set var="action" value="${path}${member}${action}${suffix}"/>
</c:if>
<c:if test="${(action eq 'list') or 
			  (action eq 'write') or 
			  (action eq 'writeok') or 
			  (action eq 'view') or 
			  (action eq 'update') or 
			  (action eq 'updateok') or
			  (action eq 'deleteok')}">
	<c:set var="action" value="${path}${board}${action}${suffix}"/>
</c:if>

<!DOCTYPE html>
<html lang="ko">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>JSP 프로젝트 v1</title>
		<link type="text/css" href="css/layout.css"
			rel="stylesheet" />
		<style type="text/css">
		</style>
	</head>

	<body>
		<%@ include file="./layout/header.jspf" %>
		<jsp:include page = "${action }" flush="false"/>
		<hr/>컨텍스트 경로:${action}
		<%@ include file="./layout/footer.jspf" %>
		
	</body>
</html>




